import request from "@/utils/request";

// 查询配送员列表
export function listDeliveryman(query) {
  return request({
    url: "/business/deliveryman/list",
    method: "get",
    params: query,
  });
}

// 查询配送员所有列表
export function listAllDeliveryman(query) {
  return request({
    url: "/business/deliveryman/listAll",
    method: "get",
    params: query,
  });
}

// 城市列表
export function cityListAll(query) {
  return request({
    url: "/business/deliveryman/city_list",
    method: "get",
    params: query,
  });
}
// 查询配送员详细
export function getDeliveryman(id) {
  return request({
    url: "/business/deliveryman/getInfo/" + id,
    method: "get",
  });
}

// 新增配送区域
export function addScope(data) {
  return request({
    url: "/business/deliverymanScope/add",
    method: "post",
    data: data,
  });
}
// 查询配配送区域
export function listAllScope(query) {
  return request({
    url: "/business/deliverymanScope/listAll",
    method: "get",
    params: query,
  });
}
// 新增配送员
export function addDeliveryman(data) {
  return request({
    url: "/business/deliveryman/add",
    method: "post",
    data: data,
  });
}

// 修改配送员
export function updateDeliveryman(data) {
  return request({
    url: "/business/deliveryman/edit",
    method: "post",
    data: data,
  });
}

// 删除配送员
export function delDeliveryman(id) {
  return request({
    url: "/business/deliveryman/remove/" + id,
    method: "get",
  });
}
